export default {
  config: {
    items: [
      {
        componentName: 'app-select',
        type: 'select',
        label: 'select选择',
        key: 'test',
        value: '1',
        options: [{
          value: '1',
          label: '公司新闻'
        }, {
          value: '2',
          label: '新闻列表'
        }]
      },
      {
        componentName: 'el-input',
        type: 'text',
        label: 'test_string',
        key: 'test_string',
        placeholder: 'test_string'
      },
      {
        componentName: 'el-input-number',
        max: 100,
        min: 0,
        value: '5',
        key: 'test_int',
        label: 'test_int',
        placeholder: 'test_int'
      },
      {
        componentName: 'el-select',
        type: 'bool',
        key: 'test_bool',
        label: 'test_bool',
        value: '',
        options: [{
          value: '',
          label: '请选择'
        }, {
          value: 'true',
          label: 'true'
        }, {
          value: 'false',
          label: 'false'
        }],
        render: (h, item) => {
          return item.options.map(option => {
            const props = {
              props:{
                key: option.value,
                label: option.label,
                value: option.value
              }
            }
            return (<el-option  {...props}></el-option>)
          });
        }
      },
      {
        componentName: 'el-select',
        type: 'enum',
        multiple: true,
        label: 'test_enum',
        key: 'test_enum',
        value: [],
        options: [{
          value: 1,
          label: '1'
        }, {
          value: 2,
          label: '2'
        }, {
          value: 3,
          label: '3名称'
        }],
        render: (h, item) => {
          return item.options.map(option => {
            const props = {
              props:{
                key: option.value,
                label: option.label,
                value: option.value
              }
            }
            return (<el-option  {...props}></el-option>)
          });
        }
      },
      {
        componentName: 'app-img',
        key: 'test_image',
        action: 'https://jsonplaceholder.typicode.com/posts/',
        placeholder: 'test_image'
      }
    ]
  }
}
